package com.school.information.core.wechat.constant;

public class WeChatConstant {

    /**
     * 微信网页授权获取code 链接地址
     */
    public static String WECHAT_AUTHORIZE = "https://open.weixin.qq.com/connect/oauth2/authorize";

    /**
     * 微信开放平台，拉取登录后的用户信息
     */
    public static String WECHAT_OPEN_USER_INFO = "https://api.weixin.qq.com/sns/userinfo";

    /**
     * 微信网页授权获取access_token信息
     */
    public static String WECHAT_ACCESS_TOKEN = "https://api.weixin.qq.com/sns/oauth2/access_token";

    /**
     * 微信扫码授权登录
     */
    public static String WECHAT_QRCONNECT = "https://open.weixin.qq.com/connect/qrconnect";

    /**
     * 微信网页获取用户基本信息接口 https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN
     */
    public static String WECHAT_USER_INFO = "https://api.weixin.qq.com/cgi-bin/user/info";

    /**
     * 微信网页验证token是否合法有效  https://api.weixin.qq.com/sns/auth?access_token=ACCESS_TOKEN&openid=OPENID
     * 正确结果 { "errcode":0,"errmsg":"ok"}
     * 错误结果 { "errcode":40003,"errmsg":"invalid openid"}
     */
    public static String WECHAT_AUTH = "https://api.weixin.qq.com/sns/auth";

    /**
     * https://api.weixin.qq.com/sns/oauth2/refresh_token?appid=APPID&grant_type=refresh_token&refresh_token=REFRESH_TOKEN
     * 微信网页刷新token
     * {
     * "access_token":"ACCESS_TOKEN",
     * "expires_in":7200,
     * "refresh_token":"REFRESH_TOKEN",
     * "openid":"OPENID",
     * "scope":"SCOPE"
     * }
     */
    public static String WECHAT_REFRESH_TOKEN = "https://api.weixin.qq.com/sns/oauth2/refresh_token";

    /**
     * https://api.weixin.qq.com/cgi-bin/media/upload?access_token=ACCESS_TOKEN&type=TYPE
     * type 媒体文件类型，分别有图片（image）、语音（voice）、视频（video）和缩略图（thumb）
     * 创建素材返回mediaId
     */
    public static String WECHAT_UPLOAD_URL = "https://api.weixin.qq.com/cgi-bin/media/upload";


    /**
     * 微信小程序登录接口
     * https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code
     */
    public static String WECHAT_APP_SESSION = "https://api.weixin.qq.com/sns/jscode2session";

    /**
     * 微信小程序获取access_token
     */
    public static String WECHAT_APP_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token";

    /**
     * 创建直播间
     */
    public static String WECHAT_APP_CREATE_ROOM = "https://api.weixin.qq.com/wxaapi/broadcast/room/create?access_token=";

    /**
     * 更新直播间
     */
    public static String WECHAT_APP_UPDATE_ROOM = "https://api.weixin.qq.com/wxaapi/broadcast/room/editroom?access_token=";

    /**
     * 获取直播间列表
     */
    public static String WECHAT_APP_ROOM_LIST = "https://api.weixin.qq.com/wxa/business/getliveinfo?access_token=";

    /**
     * 获取直播间视频回放
     */
    public static String WECHAT_APP_REPLAY_ROOM = "https://api.weixin.qq.com/wxa/business/getliveinfo?access_token=";

    /**
     * 删除直播间
     */
    public static String WECHAT_APP_DEL_ROOM = "https://api.weixin.qq.com/wxaapi/broadcast/room/deleteroom?access_token=";

    /**
     * 获取正在直播的推流地址
     */
    public static String WECHAT_APP_LIVE_URL = "https://api.weixin.qq.com/wxaapi/broadcast/room/getpushurl?access_token=";
}
